home *** CD-ROM | disk | FTP | other *** search
/ El Mac 9 / El Mac 9.iso / Shareware / Applications / Charting Coach v1.5 / Charting Coach v1.dxr / 00268.ls < prev    next >
Encoding:
Text File  |  1996-04-08  |  1.1 KB  |  39 lines

  1. on mouseDown
  2.   if the castNum of sprite 11 = the number of member "nob" then
  3.     repeat while the mouseDown
  4.       if (the mouseH > 220) and (the mouseH < 502) then
  5.         set the locH of sprite 11 to the mouseH
  6.         updateStage()
  7.       end if
  8.     end repeat
  9.   end if
  10. end
  11.  
  12. on mouseUp
  13.   global firstMonthlyDay, stamp
  14.   if the castNum of sprite 11 = the number of member "nob" then
  15.     cursor(4)
  16.     set MaxScroll to count(stamp)
  17.     set newLocation to the locH of sprite 11
  18.     if newLocation > 480 then
  19.       set firstMonthlyDay to MaxScroll - 11
  20.     else
  21.       if newLocation < 220 then
  22.         set firstMonthlyDay to 1
  23.       else
  24.         set MoveDegree to (newLocation - 220) / 279.0
  25.         set MoveLength to integer(MaxScroll * MoveDegree) - 11
  26.         set firstMonthlyDay to 4 + MoveLength
  27.         if firstMonthlyDay > (MaxScroll - 11) then
  28.           set firstMonthlyDay to MaxScroll - 12
  29.         end if
  30.         if firstMonthlyDay < 1 then
  31.           set firstMonthlyDay to 1
  32.         end if
  33.         put firstMonthlyDay
  34.       end if
  35.     end if
  36.     resetMonthlyDays()
  37.   end if
  38. end
  39.